export const SevenSegDisplay = ({c, dot, color, showName}:{
  c: string;
  dot?: boolean;
  color?:string;
  showName?:boolean;
}) => {
  const visible = [
    ['0',    '2','3',    '5','6','7','8','9'].includes(c),
    ['0','1','2','3','4',        '7','8','9'].includes(c),
    ['0','1',    '3','4','5','6','7','8','9'].includes(c),
    ['0',    '2','3',    '5','6',    '8','9'].includes(c),
    ['0',    '2',            '6',    '8'    ].includes(c),
    ['0',            '4','5','6',    '8','9'].includes(c),
    [        '2','3','4','5','6',    '8','9'].includes(c)
  ]
  return (
    <svg version="1.1" viewBox="0 0 432 576">
      <g fill="#D1D3D4" stroke="#000" strokeWidth="4" strokeMiterlimit="10">
        { visible[0] && <polygon fill={visible[0] ? (color ?? 'green'):''} points="278.759,55.26 242.759,91.26 98.759,91.26 62.759,55.26 98.759,19.26 242.759,19.26"/>}
        { visible[1] && <polygon fill={visible[1] ? (color ?? 'green'):''} points="287.759,64.427 323.759,100.427 323.759,244.427 287.759,280.427 251.759,244.427 251.759,100.427"/>}
        { visible[2] && <polygon fill={visible[2] ? (color ?? 'green'):''} points="287.759,295.928 323.759,331.928 323.759,475.928 287.759,511.928 251.759,475.928 251.759,331.928"/>}
        { visible[3] && <polygon fill={visible[3] ? (color ?? 'green'):''} points="278.759,520.74 242.759,556.74 98.759,556.74 62.759,520.74 98.759,484.74 242.759,484.74"/>}
        { visible[4] && <polygon fill={visible[4] ? (color ?? 'green'):''} points="53.758,295.928 89.758,331.928 89.758,475.928 53.758,511.928 17.758,475.928 17.758,331.928"/>}
        { visible[5] && <polygon fill={visible[5] ? (color ?? 'green'):''} points="53.758,64.427 89.759,100.427 89.759,244.427 53.758,280.427 17.758,244.427 17.758,100.427"/>}
        { visible[6] && <polygon fill={visible[6] ? (color ?? 'green'):''} points="278.759,287.927 242.759,323.928 98.759,323.928 62.759,287.927 98.759,251.927 242.759,251.927"/> }
        { !!dot      && <circle  cx="373.241" cy="515.74" r="41"/>}
      </g>
      <g fill="black" display={showName ? 'normal':'none'}>
        {/* A ~ G */}
        <path d="M151.266,71.178l24.346-42.949h6.768l7.09,42.949h-5.566l-2.08-12.363H164.45l-6.885,12.363H151.266z M166.911,54.391 h14.209l-1.67-10.781c-0.645-4.277-1.046-7.841-1.201-10.693c-0.978,2.461-2.402,5.381-4.277,8.76L166.911,54.391z"/>
        <path d="M266.515,190.846l8.994-42.949h13.301c2.422,0,4.219,0.098,5.391,0.293c1.914,0.333,3.53,0.913,4.849,1.743 c1.318,0.831,2.339,1.963,3.062,3.398s1.084,3.022,1.084,4.761c0,2.363-0.649,4.443-1.948,6.24 c-1.299,1.797-3.286,3.164-5.962,4.102c2.324,0.762,4.063,1.909,5.215,3.442c1.152,1.534,1.729,3.325,1.729,5.376 c0,2.363-0.679,4.629-2.036,6.797s-3.154,3.843-5.391,5.024c-2.236,1.182-4.731,1.772-7.485,1.772H266.515z M273.282,185.982 h9.785c2.598,0,4.346-0.088,5.244-0.264c1.816-0.312,3.291-0.845,4.424-1.597c1.133-0.751,2.021-1.743,2.666-2.974 s0.967-2.52,0.967-3.867c0-2.011-0.63-3.54-1.89-4.585c-1.26-1.044-3.657-1.567-7.192-1.567h-10.898L273.282,185.982z M277.413,166.236h8.701c4.16,0,7.153-0.664,8.979-1.992c1.826-1.328,2.739-3.262,2.739-5.801c0-1.211-0.283-2.256-0.85-3.135 s-1.323-1.519-2.271-1.919c-0.947-0.4-2.729-0.601-5.347-0.601h-9.141L277.413,166.236z"/>
        <path d="M300.089,405.396l5.684,0.791c-1.797,4.961-4.414,8.711-7.852,11.25s-7.295,3.809-11.572,3.809 c-5.215,0-9.351-1.592-12.407-4.775s-4.585-7.744-4.585-13.682c0-7.734,2.324-14.131,6.973-19.189 c4.141-4.512,9.287-6.768,15.439-6.768c4.551,0,8.237,1.221,11.06,3.662s4.458,5.723,4.907,9.844l-5.361,0.498 c-0.566-3.105-1.733-5.425-3.501-6.958s-4.048-2.3-6.841-2.3c-5.254,0-9.502,2.334-12.744,7.002 c-2.813,4.023-4.219,8.799-4.219,14.326c0,4.414,1.084,7.783,3.252,10.107s4.99,3.486,8.467,3.486c2.969,0,5.654-0.967,8.057-2.9 S298.995,408.931,300.089,405.396z"/>
        <path d="M151.087,540.012l8.965-42.949h12.95c3.105,0,5.479,0.225,7.119,0.674c2.344,0.605,4.345,1.685,6.006,3.237 c1.659,1.553,2.909,3.491,3.75,5.815c0.839,2.324,1.26,4.932,1.26,7.822c0,3.457-0.523,6.606-1.568,9.448s-2.412,5.342-4.102,7.5 s-3.457,3.848-5.303,5.068s-4.027,2.124-6.547,2.71c-1.915,0.449-4.268,0.674-7.061,0.674H151.087z M157.855,535.148h6.797 c3.066,0,5.791-0.283,8.174-0.85c1.483-0.352,2.754-0.869,3.809-1.553c1.386-0.879,2.646-2.041,3.779-3.486 c1.483-1.914,2.67-4.097,3.559-6.548s1.334-5.239,1.334-8.364c0-3.477-0.606-6.147-1.816-8.013 c-1.212-1.865-2.754-3.101-4.629-3.706c-1.388-0.449-3.545-0.674-6.475-0.674h-7.588L157.855,535.148z"/>
        <path d="M33.269,421.513l8.994-42.949h30.996l-1.025,4.893H46.98l-2.813,13.359h24.609l-1.025,4.893H43.142l-3.105,14.941h27.041 l-1.025,4.863H33.269z"/>
        <path d="M33.298,191.846l8.965-42.949h27.92l-1.025,4.893H46.98l-2.842,13.682h22.588l-1.025,4.893H43.113l-4.072,19.482H33.298z"/>
        <path d="M173.001,289.412l1.025-4.863h18.809l-3.662,17.49c-2.363,1.484-5.059,2.695-8.086,3.633s-6.006,1.406-8.936,1.406 c-6.25,0-10.918-1.885-14.004-5.654c-2.598-3.184-3.896-7.275-3.896-12.275c0-5.156,1.138-9.848,3.413-14.077 c2.275-4.229,5.146-7.354,8.613-9.375s7.319-3.032,11.558-3.032c3.047,0,5.781,0.552,8.203,1.655 c2.422,1.104,4.277,2.578,5.566,4.424s2.217,4.253,2.783,7.222l-5.625,0.615c-0.605-2.949-1.86-5.21-3.765-6.782 c-1.904-1.572-4.351-2.358-7.339-2.358c-3.105,0-6.006,0.845-8.701,2.534c-2.695,1.689-4.849,4.238-6.46,7.646 c-1.611,3.409-2.417,7.28-2.417,11.616c0,4.316,1.064,7.578,3.193,9.785s5.068,3.311,8.818,3.311c3.73,0,7.744-1.23,12.041-3.691 l1.934-9.229H173.001z"/>
        {/* DP */}
        <path d="M343.874,537.158l7.172-34.359h10.359c2.484,0,4.383,0.18,5.695,0.539c1.875,0.484,3.477,1.348,4.805,2.59 s2.328,2.793,3,4.652s1.008,3.945,1.008,6.258c0,2.766-0.418,5.285-1.254,7.559s-1.93,4.273-3.281,6s-2.766,3.078-4.242,4.055 s-3.223,1.699-5.238,2.168c-1.531,0.359-3.414,0.539-5.648,0.539H343.874z M349.288,533.268h5.438 c2.453,0,4.633-0.227,6.539-0.68c1.188-0.281,2.203-0.695,3.047-1.242c1.109-0.703,2.117-1.633,3.023-2.789 c1.188-1.531,2.137-3.277,2.848-5.238s1.066-4.191,1.066-6.691c0-2.781-0.484-4.918-1.453-6.41s-2.203-2.48-3.703-2.965 c-1.109-0.359-2.836-0.539-5.18-0.539h-6.07L349.288,533.268z"/>
        <path d="M378.468,537.158l7.195-34.359h14.344c2.484,0,4.348,0.285,5.59,0.855s2.27,1.547,3.082,2.93s1.219,2.934,1.219,4.652 c0,1.422-0.289,2.867-0.867,4.336s-1.309,2.68-2.191,3.633s-1.777,1.672-2.684,2.156s-1.875,0.844-2.906,1.078 c-2.203,0.516-4.43,0.773-6.68,0.773h-8.602l-2.906,13.945H378.468z M386.788,519.322h7.57c2.938,0,5.094-0.316,6.469-0.949 s2.477-1.598,3.305-2.895s1.242-2.672,1.242-4.125c0-1.125-0.219-2.043-0.656-2.754s-1.055-1.234-1.852-1.57 s-2.328-0.504-4.594-0.504h-8.813L386.788,519.322z"/>
      </g>
    </svg>
  )
}


/**
export const SevenSegDisplay = () => {
  return (
<svg version="1.1" 
    x="0px" y="0px"
	  width="432px" height="576px" 
    viewBox="0 0 432 576" 
>
<g>
	<g>
		<polygon fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="278.759,287.927 242.759,323.928 98.759,323.928 62.759,287.927 98.759,251.927 242.759,251.927"/>
		<polygon fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="278.759,520.74 242.759,556.74 98.759,556.74 62.759,520.74 98.759,484.74 242.759,484.74"/>
		<polygon fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="287.759,295.928 323.759,331.928 323.759,475.928 287.759,511.928 251.759,475.928 251.759,331.928"/>
		<polygon fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="53.758,295.928 89.758,331.928 89.758,475.928 53.758,511.928 17.758,475.928 17.758,331.928"/>
		<polygon fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="278.759,55.26 242.759,91.26 98.759,91.26 62.759,55.26 98.759,19.26 242.759,19.26"/>
		<polygon fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="287.759,64.427 323.759,100.427 323.759,244.427 287.759,280.427 251.759,244.427 251.759,100.427"/>
		<polygon fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" points="53.758,64.427 89.759,100.427 89.759,244.427 53.758,280.427 17.758,244.427 17.758,100.427"/>
	</g>
	<g>
		<g>
			<path d="M151.266,71.178l24.346-42.949h6.768l7.09,42.949h-5.566l-2.08-12.363H164.45l-6.885,12.363H151.266z M166.911,54.391 h14.209l-1.67-10.781c-0.645-4.277-1.046-7.841-1.201-10.693c-0.978,2.461-2.402,5.381-4.277,8.76L166.911,54.391z"/>
		</g>
		<g>
			<path d="M266.515,190.846l8.994-42.949h13.301c2.422,0,4.219,0.098,5.391,0.293c1.914,0.333,3.53,0.913,4.849,1.743 c1.318,0.831,2.339,1.963,3.062,3.398s1.084,3.022,1.084,4.761c0,2.363-0.649,4.443-1.948,6.24 c-1.299,1.797-3.286,3.164-5.962,4.102c2.324,0.762,4.063,1.909,5.215,3.442c1.152,1.534,1.729,3.325,1.729,5.376 c0,2.363-0.679,4.629-2.036,6.797s-3.154,3.843-5.391,5.024c-2.236,1.182-4.731,1.772-7.485,1.772H266.515z M273.282,185.982 h9.785c2.598,0,4.346-0.088,5.244-0.264c1.816-0.312,3.291-0.845,4.424-1.597c1.133-0.751,2.021-1.743,2.666-2.974 s0.967-2.52,0.967-3.867c0-2.011-0.63-3.54-1.89-4.585c-1.26-1.044-3.657-1.567-7.192-1.567h-10.898L273.282,185.982z M277.413,166.236h8.701c4.16,0,7.153-0.664,8.979-1.992c1.826-1.328,2.739-3.262,2.739-5.801c0-1.211-0.283-2.256-0.85-3.135 s-1.323-1.519-2.271-1.919c-0.947-0.4-2.729-0.601-5.347-0.601h-9.141L277.413,166.236z"/>
		</g>
		<g>
			<path d="M300.089,405.396l5.684,0.791c-1.797,4.961-4.414,8.711-7.852,11.25s-7.295,3.809-11.572,3.809 c-5.215,0-9.351-1.592-12.407-4.775s-4.585-7.744-4.585-13.682c0-7.734,2.324-14.131,6.973-19.189 c4.141-4.512,9.287-6.768,15.439-6.768c4.551,0,8.237,1.221,11.06,3.662s4.458,5.723,4.907,9.844l-5.361,0.498 c-0.566-3.105-1.733-5.425-3.501-6.958s-4.048-2.3-6.841-2.3c-5.254,0-9.502,2.334-12.744,7.002 c-2.813,4.023-4.219,8.799-4.219,14.326c0,4.414,1.084,7.783,3.252,10.107s4.99,3.486,8.467,3.486c2.969,0,5.654-0.967,8.057-2.9 S298.995,408.931,300.089,405.396z"/>
		</g>
		<g>
			<path d="M151.087,540.012l8.965-42.949h12.95c3.105,0,5.479,0.225,7.119,0.674c2.344,0.605,4.345,1.685,6.006,3.237 c1.659,1.553,2.909,3.491,3.75,5.815c0.839,2.324,1.26,4.932,1.26,7.822c0,3.457-0.523,6.606-1.568,9.448s-2.412,5.342-4.102,7.5 s-3.457,3.848-5.303,5.068s-4.027,2.124-6.547,2.71c-1.915,0.449-4.268,0.674-7.061,0.674H151.087z M157.855,535.148h6.797 c3.066,0,5.791-0.283,8.174-0.85c1.483-0.352,2.754-0.869,3.809-1.553c1.386-0.879,2.646-2.041,3.779-3.486 c1.483-1.914,2.67-4.097,3.559-6.548s1.334-5.239,1.334-8.364c0-3.477-0.606-6.147-1.816-8.013 c-1.212-1.865-2.754-3.101-4.629-3.706c-1.388-0.449-3.545-0.674-6.475-0.674h-7.588L157.855,535.148z"/>
		</g>
		<g>
			<path d="M33.269,421.513l8.994-42.949h30.996l-1.025,4.893H46.98l-2.813,13.359h24.609l-1.025,4.893H43.142l-3.105,14.941h27.041 l-1.025,4.863H33.269z"/>
		</g>
		<g>
			<path d="M33.298,191.846l8.965-42.949h27.92l-1.025,4.893H46.98l-2.842,13.682h22.588l-1.025,4.893H43.113l-4.072,19.482H33.298z"/>
		</g>
		<g>
			<path d="M173.001,289.412l1.025-4.863h18.809l-3.662,17.49c-2.363,1.484-5.059,2.695-8.086,3.633s-6.006,1.406-8.936,1.406 c-6.25,0-10.918-1.885-14.004-5.654c-2.598-3.184-3.896-7.275-3.896-12.275c0-5.156,1.138-9.848,3.413-14.077 c2.275-4.229,5.146-7.354,8.613-9.375s7.319-3.032,11.558-3.032c3.047,0,5.781,0.552,8.203,1.655 c2.422,1.104,4.277,2.578,5.566,4.424s2.217,4.253,2.783,7.222l-5.625,0.615c-0.605-2.949-1.86-5.21-3.765-6.782 c-1.904-1.572-4.351-2.358-7.339-2.358c-3.105,0-6.006,0.845-8.701,2.534c-2.695,1.689-4.849,4.238-6.46,7.646 c-1.611,3.409-2.417,7.28-2.417,11.616c0,4.316,1.064,7.578,3.193,9.785s5.068,3.311,8.818,3.311c3.73,0,7.744-1.23,12.041-3.691 l1.934-9.229H173.001z"/>
		</g>
	</g>
	<g>
		<circle fill="#D1D3D4" stroke="#000000" stroke-width="4" stroke-miterlimit="10" cx="373.241" cy="515.74" r="41"/>
		<g>
			<path d="M343.874,537.158l7.172-34.359h10.359c2.484,0,4.383,0.18,5.695,0.539c1.875,0.484,3.477,1.348,4.805,2.59 s2.328,2.793,3,4.652s1.008,3.945,1.008,6.258c0,2.766-0.418,5.285-1.254,7.559s-1.93,4.273-3.281,6s-2.766,3.078-4.242,4.055 s-3.223,1.699-5.238,2.168c-1.531,0.359-3.414,0.539-5.648,0.539H343.874z M349.288,533.268h5.438 c2.453,0,4.633-0.227,6.539-0.68c1.188-0.281,2.203-0.695,3.047-1.242c1.109-0.703,2.117-1.633,3.023-2.789 c1.188-1.531,2.137-3.277,2.848-5.238s1.066-4.191,1.066-6.691c0-2.781-0.484-4.918-1.453-6.41s-2.203-2.48-3.703-2.965 c-1.109-0.359-2.836-0.539-5.18-0.539h-6.07L349.288,533.268z"/>
			<path d="M378.468,537.158l7.195-34.359h14.344c2.484,0,4.348,0.285,5.59,0.855s2.27,1.547,3.082,2.93s1.219,2.934,1.219,4.652 c0,1.422-0.289,2.867-0.867,4.336s-1.309,2.68-2.191,3.633s-1.777,1.672-2.684,2.156s-1.875,0.844-2.906,1.078 c-2.203,0.516-4.43,0.773-6.68,0.773h-8.602l-2.906,13.945H378.468z M386.788,519.322h7.57c2.938,0,5.094-0.316,6.469-0.949 s2.477-1.598,3.305-2.895s1.242-2.672,1.242-4.125c0-1.125-0.219-2.043-0.656-2.754s-1.055-1.234-1.852-1.57 s-2.328-0.504-4.594-0.504h-8.813L386.788,519.322z"/>
		</g>
	</g>
</g>
</svg>
)
}

 */